All Questions
4 questions
2votes
1answer
118views
Is it a good software engineering practice to store libraries as attributes of objects?
Suppose I initialize a library, say, in python object - #filename: file_A import file_ class A(): def __init__(self): self.pd = file_.pd self.np = file_.np And suppose the ...
2votes
2answers
4kviews
Module with globals or Class with attributes?
Currently I'm working with a lot of modules where the original developers used global variables to control states and to exchange important information between functions, like so: STATE_VAR = 0 def ...
-1votes
1answer
329views
What is the programming paradigm when I just use functions in a file to organize my program?
I'm programming a telegram bot with Python and, for a number of reasons, there are no classes in the whole project, just several functions correlated to the the file where they are located. E.g., my ...
0votes
1answer
399views
Can I explain Classes and Objects without the full stack of OOP concepts?
I've been teaching Python to someone that was new to programming; and so far, so good. Now, I'm about to teach Classes and Objects. However, I still think it's too soon for the whole OOP concept, plus ...